<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns:yui="http://yuilibrary.com/rdf/1.0/yui.rdf#">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<title>API: yahoo  YAHOO.util.YAHOO.env.ua   (YUI Library)</title>

	<link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css" />
	<link rel="stylesheet" type="text/css" href="assets/api.css" />

    <script type="text/javascript" src="assets/api-js"></script>
    <script type="text/javascript" src="assets/ac-js"></script>
</head>

<body id="yahoo-com">

<div id="doc3" class="yui-t2">
	<div id="hd">
        <h1><a href="http://developer.yahoo.com/yui/" title="Yahoo! UI Library">Yahoo! UI Library</a></h1>
        <h3>YAHOO Global&nbsp; <span class="subtitle">2.7.0b</span></h3>
        <a href="./index.html" title="Yahoo! UI Library">Yahoo! UI Library</a> 
            &gt; <a href="./module_yahoo.html" title="yahoo">yahoo</a>
                 &gt; YAHOO.util.YAHOO.env.ua 
                
        <form onsubmit="return false">
            <div id="propertysearch">
                搜索: <input autocomplete="off" id="searchinput" />
                <div id="searchresults">
                    &nbsp;
                </div>
            </div>
        </form>
	</div>

	<div id="bd">
		<div id="yui-main">
			<div class="yui-b">
            <form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form">
                <fieldset>
                    <legend>Filters</legend>
                <span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">显示 Private</label></span>
                <span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">显示 Protected</label></span>
                <span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">显示 Deprecated</label></span>
                </fieldset>
            </form>

                    <h2>
                        

                        <code>static</code>
                        
                            Class <b property="yui:name">YAHOO.util.YAHOO.env.ua</b>
                        <span class="extends">
                        </span>

                    </h2>
                    <!-- class tree goes here -->
                    
                
  

                    <div class="summary description" property="yui:description">
                        说明：	能避免的话就避免检测浏览器信息。尽量使用特征检测。除非万不得已才使用浏览器检测。
YAHOO.env存储了所有浏览器引擎的版本号，默认都是0，这个值不一定就是正在使用该引擎的浏览器版本号。
该值是一个浮点值，所以很容易用布尔判断，也可以查出具体的版本范围。正因为如此，
一些更精确的版本信息将被丢失，(比如,Gecko1.8.0.9将显示为1.8）
                    </div>

                    
                    <div rel="yui:properties" resource="#properties">
                        <div class="section field details">
                            <h3 id="properties">Properties</h3>
                            <div class="content">
                                    <div class="" rel="yui:property" resource="#property_air">
                                    <h4><a name="property_air" property="yui:name">air</a>
                                        - <code><span property="yui:type">float</span></code>
                                    </h4>
                                    <div class="detail">
                                        <div class="description" property="yui:description">
                                            如果检测到webkit时候,表示Adobe AIR 版本号，比如1.0，否则为0.
                                        </div>
                                    </div>
     
                                        


                                    <hr />
                                    </div>
                                    <div class="" rel="yui:property" resource="#property_caja">
                                    <h4><a name="property_caja" property="yui:name">caja</a>
                                        - <code><span property="yui:type">float</span></code>
                                    </h4>
                                    <div class="detail">
                                        <div class="description" property="yui:description">
                                            Google Caja 版本号或者 0.
                                        </div>
                                    </div>
     
                                        


                                    <hr />
                                    </div>
                                    <div class="" rel="yui:property" resource="#property_gecko">
                                    <h4><a name="property_gecko" property="yui:name">gecko</a>
                                        - <code><span property="yui:type">float</span></code>
                                    </h4>
                                    <div class="detail">
                                        <div class="description" property="yui:description">
                                            Gecko 引擎版本号，比如1.8，如果Gecko被检测到，但是没找到版本号则为1 
如果是其他浏览器则是0
<pre>
Firefox 1.0.0.4: 1.7.8   <-- Reports 1.7
Firefox 1.5.0.9: 1.8.0.9 <-- Reports 1.8
Firefox 2.0.0.3: 1.8.1.3 <-- Reports 1.8
Firefox 3 alpha: 1.9a4   <-- Reports 1.9
</pre>
                                        </div>
                                    </div>
     
                                        


                                    <hr />
                                    </div>
                                    <div class="" rel="yui:property" resource="#property_ie">
                                    <h4><a name="property_ie" property="yui:name">ie</a>
                                        - <code><span property="yui:type">float</span></code>
                                    </h4>
                                    <div class="detail">
                                        <div class="description" property="yui:description">
                                            IE版本号，比如: 6，如果不是ie则是0
                                        </div>
                                    </div>
     
                                        


                                    <hr />
                                    </div>
                                    <div class="" rel="yui:property" resource="#property_mobile">
                                    <h4><a name="property_mobile" property="yui:name">mobile</a>
                                        - <code><span property="yui:type">string</span></code>
                                    </h4>
                                    <div class="detail">
                                        <div class="description" property="yui:description">
                                            当检测到时现代浏览器的时候,移动属性将设置为一个包含相关引擎信息的字符串，
当前仅限iPhone/iPod掌上机的Safari，和具有WebKit-based浏览器和OperaMini浏览器的Nokia N系列
                                        </div>
                                    </div>
     
                                        


                                    <hr />
                                    </div>
                                    <div class="" rel="yui:property" resource="#property_opera">
                                    <h4><a name="property_opera" property="yui:name">opera</a>
                                        - <code><span property="yui:type">float</span></code>
                                    </h4>
                                    <div class="detail">
                                        <div class="description" property="yui:description">
                                            Opera版本号，比如: 9.2，如果不是Opera则是0
                                        </div>
                                    </div>
     
                                        


                                    <hr />
                                    </div>
                                    <div class="" rel="yui:property" resource="#property_webkit">
                                    <h4><a name="property_webkit" property="yui:name">webkit</a>
                                        - <code><span property="yui:type">float</span></code>
                                    </h4>
                                    <div class="detail">
                                        <div class="description" property="yui:description">
                                            AppleWebKit版本，比如418.9.1.  KHTML浏览器不是WebKit浏览器，将是1，其他浏览器是0， 
<pre>
Safari 1.3.2 (312.6): 312.8.1 <-- Reports 312.8 -- currently the 
latest available for Mac OSX 10.3.
Safari 2.0.2:         416     <-- hasOwnProperty introduced
Safari 2.0.4:         418     <-- preventDefault fixed
Safari 2.0.4 (419.3): 418.9.1 <-- One version of Safari may run
different versions of webkit
Safari 2.0.4 (419.3): 419     <-- Tiger installations that have been
updated, but not updated
to the latest patch.
Webkit 212 nightly:   522+    <-- Safari 3.0 precursor (with native SVG
and many major issues fixed).  
3.x yahoo.com, flickr:422     <-- Safari 3.x hacks the user agent
string when hitting yahoo.com and 
flickr.com.
Safari 3.0.4 (523.12):523.12  <-- First Tiger release - automatic update
from 2.x via the 10.4.11 OS patch
Webkit nightly 1/2008:525+    <-- Supports DOMContentLoaded event.
yahoo.com user agent hack removed.
</pre>
http://developer.apple.com/internet/safari/uamatrix.html
                                        </div>
                                    </div>
     
                                        


                                    <hr />
                                    </div>
                            </div>
                        </div>

                    </div>

                    <div rel="yui:methods" resource="#methods">

                    </div>

                    <div rel="yui:events" resource="#events">


                    </div>

                    <div rel="yui:attributes" resource="#configattributes">

                    </div>

			</div>
		</div>
		<div class="yui-b">
            <div class="nav">

                    <div id="moduleList" class="module">
                        <h4>模块</h4>
                        <ul class="content">
                                <li class=""><a href="module_animation.html" title="animation">animation</a></li>
                                <li class=""><a href="module_button.html" title="button">button</a></li>
                                <li class=""><a href="module_connection.html" title="connection">connection</a></li>
                                <li class=""><a href="module_cookie.html" title="cookie">cookie</a></li>
                                <li class=""><a href="module_dom.html" title="dom">dom</a></li>
                                <li class=""><a href="module_element.html" title="element">element</a></li>
                                <li class=""><a href="module_event.html" title="event">event</a></li>
                                <li class=""><a href="module_get.html" title="get">get</a></li>
                                <li class=""><a href="module_imagecropper.html" title="imagecropper">imagecropper</a></li>
                                <li class=""><a href="module_json.html" title="json">json</a></li>
                                <li class=""><a href="module_logger.html" title="logger">logger</a></li>
                                <li class=""><a href="module_profiler.html" title="profiler">profiler</a></li>
                                <li class=""><a href="module_stylesheet.html" title="stylesheet">stylesheet</a></li>
                                <li class="selected"><a href="module_yahoo.html" title="yahoo">yahoo</a></li>
                        </ul>
                    </div>

                    <div id="classList" class="module">
                        <h4>类</h4>
                        <ul class="content">
                                <li class=""><a href="YAHOO.util.YAHOO.html" title="YAHOO.util.YAHOO">YAHOO.util.YAHOO</a></li>
                                <li class=""><a href="YAHOO.util.YAHOO.env.html" title="YAHOO.util.YAHOO.env">YAHOO.util.YAHOO.env</a></li>
                                <li class="selected"><a href="YAHOO.util.YAHOO.env.ua.html" title="YAHOO.util.YAHOO.env.ua">YAHOO.util.YAHOO.env.ua</a></li>
                                <li class=""><a href="YAHOO.util.YAHOO.lang.html" title="YAHOO.util.YAHOO.lang">YAHOO.util.YAHOO.lang</a></li>
                                <li class=""><a href="YAHOO.util.YAHOO_config.html" title="YAHOO.util.YAHOO_config">YAHOO.util.YAHOO_config</a></li>
                        </ul>
                    </div>


                    <div id="propertyList" class="module">
                        <h4>属性</h4>
                        <ul class="content">        
                                <li class=""><a href="#property_air" title="air">air</a></li>
                                <li class=""><a href="#property_caja" title="caja">caja</a></li>
                                <li class=""><a href="#property_gecko" title="gecko">gecko</a></li>
                                <li class=""><a href="#property_ie" title="ie">ie</a></li>
                                <li class=""><a href="#property_mobile" title="mobile">mobile</a></li>
                                <li class=""><a href="#property_opera" title="opera">opera</a></li>
                                <li class=""><a href="#property_webkit" title="webkit">webkit</a></li>
                        </ul>
                    </div>




            </div>
		</div>
	</div>
	<div id="ft">
        <hr />
        Copyright &copy; 2009 Yahoo! Inc. All rights reserved.
	</div>
</div>
<script type="text/javascript">
    ALL_YUI_PROPS = [{"url": "YAHOO.util.YAHOO.env.ua.html#property_air", "access": "", "host": "YAHOO.util.YAHOO.env.ua", "type": "property", "name": "air"}, {"url": "YAHOO.util.YAHOO.env.ua.html#property_caja", "access": "", "host": "YAHOO.util.YAHOO.env.ua", "type": "property", "name": "caja"}, {"url": "YAHOO.util.YAHOO.env.ua.html#property_gecko", "access": "", "host": "YAHOO.util.YAHOO.env.ua", "type": "property", "name": "gecko"}, {"url": "YAHOO.util.YAHOO.env.html#method_getVersion", "access": "", "host": "YAHOO.util.YAHOO.env", "type": "method", "name": "getVersion"}, {"url": "YAHOO.util.YAHOO.env.ua.html#property_ie", "access": "", "host": "YAHOO.util.YAHOO.env.ua", "type": "property", "name": "ie"}, {"url": "YAHOO.util.YAHOO_config.html#property_injecting", "access": "", "host": "YAHOO.util.YAHOO_config", "type": "property", "name": "injecting"}, {"url": "YAHOO.util.YAHOO_config.html#property_listener", "access": "", "host": "YAHOO.util.YAHOO_config", "type": "property", "name": "listener"}, {"url": "YAHOO.util.YAHOO.env.html#property_listeners", "access": "", "host": "YAHOO.util.YAHOO.env", "type": "property", "name": "listeners"}, {"url": "YAHOO.util.YAHOO_config.html#property_load", "access": "", "host": "YAHOO.util.YAHOO_config", "type": "property", "name": "load"}, {"url": "YAHOO.util.YAHOO_config.html#property_locale", "access": "", "host": "YAHOO.util.YAHOO_config", "type": "property", "name": "locale"}, {"url": "YAHOO.util.YAHOO.html#method_log", "access": "", "host": "YAHOO.util.YAHOO", "type": "method", "name": "log"}, {"url": "YAHOO.util.YAHOO.env.ua.html#property_mobile", "access": "", "host": "YAHOO.util.YAHOO.env.ua", "type": "property", "name": "mobile"}, {"url": "YAHOO.util.YAHOO.env.html#property_modules", "access": "", "host": "YAHOO.util.YAHOO.env", "type": "property", "name": "modules"}, {"url": "YAHOO.util.YAHOO.html#method_namespace", "access": "", "host": "YAHOO.util.YAHOO", "type": "method", "name": "namespace"}, {"url": "YAHOO.util.YAHOO.env.ua.html#property_opera", "access": "", "host": "YAHOO.util.YAHOO.env.ua", "type": "property", "name": "opera"}, {"url": "YAHOO.util.YAHOO.html#method_register", "access": "", "host": "YAHOO.util.YAHOO", "type": "method", "name": "register"}, {"url": "YAHOO.util.YAHOO.env.ua.html#property_webkit", "access": "", "host": "YAHOO.util.YAHOO.env.ua", "type": "property", "name": "webkit"}];
</script>
</body>
</html>
